package com.zhiziai.aiproxy.exception;

/**
 * @description: 自定义异常
 * @author: maxiao1
 * @date: 2019/9/13 17:21
 */
public class ReturnException extends RuntimeException {


    public ReturnException() {
    }

    public static void checkArgument(boolean expression, Object errorMessage) {
        if (!expression) {
            throw new ReturnException(String.valueOf(errorMessage));
        }
    }

    public ReturnException(String message) {
        super(message);
    }

    public ReturnException(String message, Throwable cause) {
        super(message, cause);
    }

    public ReturnException(Throwable cause) {
        super(cause);
    }

    public ReturnException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
